#include <bits/stdc++.h>
using namespace std;

int main(){
    int n,tgx,tgy;
    cin>>n>>tgx>>tgy;
    for (int j = 1; j <= n; ++j)
        printf("(%d,%d) ",tgx,j);
    cout<<endl;
    for (int i = 1; i <= n; ++i)
        printf("(%d,%d) ",i,tgy);
    cout<<endl;
    for (int i = 1,j; i <= n; ++i) {
        j=i-tgx+tgy;
        if (j<=0 or j>n)
            continue;
        printf("(%d,%d) ",i,j);
    }
    cout<<endl;
    for (int j = 1,i; j <= n; ++j) {
        i=tgx+tgy-j;
        if (i<=0 or i>n)
            continue;
        printf("(%d,%d) ",i,j);
    }
    cout<<endl;
    return 0;
}